
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>测试</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="http://i0.sinaimg.cn/dy/js/jquery/jquery-1.7.2.min.js"></script>
</head>
<body>
<a onclick="javascript:selectMore(this.id);" id="more1">查看更多</a>
<a onclick="javascript:selectMore(this.id);" id="more2">查看更多</a>
<a onclick="javascript:selectMore(this.id);" id="more3">查看更多</a>

<button id="btn">触发A点击</button>
</body>
<script>
    $(function () {

        // 模拟点击页面上的所有a标签，触发onclick事件
        $("a").each(function () {
            document.getElementById(this.id).click(
                console.log("hello world")
            );
        })
    })
</script>
</html>
